<template>
  <div class="nav">
    <div class="area">
      <span class="first">区域：</span>
      <!-- <span>{{ this.scenics.name }}</span> -->
      <span class="mr" v-for="item in scenics" :key="item.name">
        {{ item.name }}
      </span>
      <a href="#" @click="show">
        <i class="el-icon-d-arrow-right"></i>等{{ this.num }}个区域
      </a>
    </div>

    <div class="price">
      <div class="first">
        均价
        <div class="small">?</div>
        ：
      </div>
      <div class="icon"></div>
      <div class="icon"></div>
      <div class="icon"></div>
      <el-tooltip
        class="item"
        effect="dark"
        content="等级评定是针对房价，设施和服务等各方面水平的综合评估。"
        placement="bottom-end"
      >
        <span class="mr">¥332</span>
      </el-tooltip>

      <div class="icon"></div>
      <div class="icon"></div>
      <div class="icon"></div>
      <div class="icon"></div>
      <el-tooltip
        class="item"
        effect="dark"
        content="等级评定是针对房价，设施和服务等各方面水平的综合评估。"
        placement="bottom-end"
      >
        <span class="mr">¥521</span>
      </el-tooltip>
      <el-tooltip
        class="item"
        effect="dark"
        content="等级评定是针对房价，设施和服务等各方面水平的综合评估。"
        placement="bottom-end"
      >
        <div class="icon"></div>
        <div class="icon"></div>
        <div class="icon"></div>
        <div class="icon"></div>
        <div class="icon"></div>
        <span class="mr">¥789</span>
      </el-tooltip>
    </div>
  </div>
</template>

<script>
export default {
  props: ["id", "scenics", "num"],
  data() {
    return {
      // name: this.$route.query.cityName,
    };
  },
  mounted() {
    // console.log(this.$route.query.cityName);
    this.$axios({
      method: "get",
      url: "/cities",
      params: {
        name: this.$route.query.cityName,
      },
    }).then((res) => {
      // this.id = res.data.data[0].id;
      // this.scenics = res.data.data[0].scenics;
      // this.num = res.data.data[0].scenics.length;
      // console.log(this.scenics);
      // console.log(this.id);
    });
    if (this.id) {
      console.log(this.id);
    }
  },
  methods: {
    show() {
      console.log("展示数据或者缩写数据");
    },
  },
  // watch: {
  //   id() {
  //     console.log(this.id);

  //   },
  // },
};
</script>

<style lang="less" scoped>
.nav {
  width: 60%;
  .area {
    // height: 30px;
    // overflow: hidden;
    padding: 20px 0;

    color: #666;
    font-size: 14px;
    .el-icon-d-arrow-right {
      transform: rotate(90deg);
      color: #f90;
    }
  }
  .price {
    display: flex;

    // position: relative;
    .small {
      display: inline-block;
      text-align: center;
      vertical-align: super;
      //   position: absolute;
      width: 15px;
      height: 15px;
      line-height: 15px;
      border-radius: 50%;
      background-color: #ccc;
      //   top: 5px;
      //   left: 31px;
      margin-top: -10px;
      color: #fff;
    }

    .first {
      float: left;
    }
    .icon {
      display: inline-block;
      width: 16px;
      height: 16px;
      // background: url("../../static/icon_king.png") no-repeat;
      background-size: 16px;
    }
    .mr {
      margin-right: 10px;
    }
  }
}
</style>